package com.waijiaojun.tpo.repository;

import com.waijiaojun.tpo.vo.CategoryDetailsVo;
import com.waijiaojun.tpo.vo.UserCategoryVo;
import com.waijiaojun.tpo.vo.UserScenarioProgressVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.waijiaojun.tpo.entity.UserCategory;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface UserCategoryDao {
    int insert(@Param("pojo") UserCategory pojo);

    int insertSelective(@Param("pojo") UserCategory pojo);

    int insertList(@Param("pojos") List<UserCategory> pojo);

    int update(@Param("pojo") UserCategory pojo);

    List<UserCategoryVo> findCategoryWithUser(@Param("openid")String openid);

    CategoryDetailsVo findCategoriesDetailsWithUser(@Param("openid")String openid, @Param("categoryId")Long categoryId);

    void clickButton(@Param("openid")String openid, @Param("number")Long number, @Param("scenarioId")Long scenarioId);

    UserCategory findByOpenidAndCategoryId(@Param("openid")String openid, @Param("categoryId")Long categoryId);

    List<UserScenarioProgressVo> findUserScenarioProgressWithOpenidAndCategoryId(@Param("openid")String openid, @Param("categoryId") Long categoryId);
}
